<!--  поиск по среди студентов -->
<fieldset>
<legend> <b>Поиск</b>
 		</legend>
    <?php 
echo $form->create('Search', array('action' =>'findstudent'));
?> 		
<table width="80%" cellspacing="1" cellpadding="1">
  <tr>
    <td>Уровень обучения</td>
    <td align="left"><?php echo $form->input('educationlevel_id', array('options' => $educationlevels, 'empty' => 'Уровень обучения', 'label' => '','id' => 'educationlevels'));?></td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>

  <tr>
    <td>Факультет</td>
    <td align="left">
    	<?php // echo $form->input('facultet_id',array('options' => $facultets,'empty' => 'Выберите факультет', 'label' => '', 'id' => 'facultets'), null);
    		echo $form->select('facultet_id', array(), null, array('id' => 'facultets'));
    		$facultet_options = array('url' => 'update_facultet','update' => 'facultets');
    		echo $ajax->observeField('educationlevels', $facultet_options);
    	?>
    </td>
    <td align="left">Специальность</td>
    <td align="left">
    <?php 
			echo $form->select('profession_id', array(), null, array('id' => 'professions'));
			$profession_options = array('url' => 'update_profession','update' => 'professions');
			echo $ajax->observeField('facultets', $profession_options);					
	?>  
    </td>
  </tr>
  <tr>
    <td>Курс</td>
    <td align="left">
    <?php 
			echo $form->select('course_id', array(), null, array('id' => 'courses'));
			$course_options = array('url' => 'update_course','update' => 'courses');
			echo $ajax->observeField('professions', $course_options);					
	?> 
    </td>
    <td align="left">Группа</td>
    <td align="left">
    <?php 
			echo $form->select('studentgroup_id', array(), null, array('id' => 'studentgroups'));
			$studentgroup_options = array('url' => 'update_studentgroup','update' => 'studentgroups');
			echo $ajax->observeField('courses', $studentgroup_options);					
	?>
    </td>
  </tr>
  <tr>
    <td align="left">Форма обучения</td>
    <td align="left"><?php echo $form->input('learningform_id', array('options' => $learningforms,'empty' => 'Выберите форму обучения', 'label' => '', 'id' => 'learningforms'), null);?></td>
    <td align="left">Тип обучения</td>
    <td align="left"><?php echo $form->input('learningtype_id', array('options' => $learningtypes,'empty' => 'Выберите тип обучения', 'label' => '', 'id' => 'learningtypes'), null);?></td>
   
  </tr>
  
  <tr>
    <td>Состояние студента</td>
    <td align="left"><?php echo $form->input('studentstate_id', array('options' => $studentstates, 'empty' => 'состояние студента', 'label' => ''));?></td>
	<td>&nbsp;</td>
	<td>&nbsp;</td>     
    </tr>
  <tr>
    <td width="25%">Фамилия &nbsp; </td>
    <td><?php echo $form->input('lastname', array('label' => '', 'size' => 50));?></td>
    <td>Имя</td>
    <td><?php echo $form->input('firstname', array('label' => '', 'size' => 50));?></td>
  </tr>    
  <tr>
    <td>Дата рождения</td>
    <td align="left">
    <?php echo $form->year('year', date('Y') - 50, date('Y')+30 );?>
    <?php echo $form->month('month');?>
    <?php echo $form->day('day');?></td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td width="25%">Паспорт серия</td>
    <td width="25%"><?php echo $form->input('passport_ser', array('label' => ''));?></td>
    <td width="25%">Паспорт номер</td>
    <td width="25%"><?php echo $form->input('passport_num', array('label' => ''));?></td>
  </tr>
  <tr>
    <td width="25%">№ дела &nbsp;</td>
    <td width="25%"><?php echo $form->input('student_id', array('label' => ''));?></td>
    <td width="25%">Пол</td>
    <td width="25%"><?php echo $form->input('gender_id', array('options' => $genders, 'empty' => 'Выберите пол', 'label' => '', 'id' => 'genderss'), null);?></td>
  </tr>
  <tr>
    <td width="25%">Адрес</td>
    <td width="25%"><?php echo $form->input('passport_adress', array('label' => '', 'size' => 50));?></td>
    <td width="25%">Область</td>
      <td width="25%"><?php echo $form->input('region_id', array('options' => $regions, 'empty' => 'Выберите область', 'label' => '', 'id' => 'regions'), null);?></td>
  </tr>
  <tr>
    <td>Тип док-та о образовании</td>
    <td><?php echo $form->input('educationdoctype_id', array('options' => $educationdoctypes,'empty' => 'Выберите тип документа', 'label' => '', 'id' => 'educationdoctypes'), null);?></td>
    <td>Данные док-та </td>
    <td><?php echo $form->input('educationdocdata', array('label' => '', 'size' => 50));?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td colspan="2"><?php 
    			$options = array(0 => '<b>простой список</b>&nbsp;' , 1=> '<b>файл Word</b>', 2 =>'<b>файл Excel</b>&nbsp;');
    			$atributes = array('value' => 0, 'legend' => 'Формат результата');
    			echo $form->radio('format', $options , $atributes); ?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td><?php echo $form->end('Искать'); ?></td>
    <td>&nbsp;</td>
  </tr>
</table> 	
</fieldset>	
<br />

<!-- поиск по целевикам  -->
<fieldset>
<legend>Поиск по целевикам</legend>
    <?php 
echo $form->create('Search', array('action' =>'findtgstudent'));
?> 	
  <table width="80%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="25%">Область</td>
        <td width="25%"><?php echo $form->input('region_id', array('options' => $regions, 'empty' => 'По всем областям', 'label' => '', 'id' => 'regions'), null);?></td>
        <td width="25%" align=center>Данные целевого</td>
        <td width="25%"><?php echo $form->input('info', array('label' => '', 'size' => 50));?></td>
      </tr>
      <tr>
        <td width="25%">&nbsp;</td>
        <td width="25%">&nbsp;</td>
        <td colspan="2"><?php 
    			$options = array(0 => '<b>простой список</b>&nbsp;' , 1=> '<b>файл Word</b>', 2 =>'<b>файл Excel</b>&nbsp;');
    			$atributes = array('value' => 0, 'legend' => 'Формат результата');
    			echo $form->radio('format', $options , $atributes); ?></td>
      </tr>
      <tr>
        <td width="25%">&nbsp;</td>
        <td width="25%">&nbsp;</td>
        <td width="25%"><?php echo $form->end('Искать'); ?></td>
        <td width="25%">&nbsp;</td>
      </tr>
  </table>
</fieldset>
